package lex;

import java.util.Stack;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ArithCodeGen {

	private String register;
	private String memory;
	private static Pattern p;
	private static Matcher m;
	
	static{
		p = Pattern.compile("[0-9]");
	}
	public static Vector<String> codeGen(String tree){
		Vector<String> result = new Vector<String>();;
		return codeGen(tree, result);		
	}
	public static Vector<String> codeGen(String tree, Vector<String> result){
		if(p.matcher(tree.substring(0, 1)).matches()){
			result.add(tree.substring(0, 1));
		}
		
		return result;
	}
}
